package org.cs.publics.model;
// Generated 2018-12-28 17:39:08 by Hibernate Tools 5.2.3.Final

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * GoodsType generated by hbm2java
 */
@Entity
@Table(name = "goods_type", catalog = "good_fresh")
public class GoodsType implements java.io.Serializable {

	private Integer goodsTypeId;
	private String goodsTypeName;
	private Integer goodsTypeState;
	private Date goodsTypeTime;
	private Date goodsTypeUpdateTime;
	private String goodsHoldOne;
	private String goodsHoldTwo;
	private Set<GoodsInfo> goodsInfos = new HashSet<GoodsInfo>(0);

	public GoodsType() {
	}

	public GoodsType(String goodsTypeName, Integer goodsTypeState, Date goodsTypeTime, Date goodsTypeUpdateTime,
			String goodsHoldOne, String goodsHoldTwo, Set<GoodsInfo> goodsInfos) {
		this.goodsTypeName = goodsTypeName;
		this.goodsTypeState = goodsTypeState;
		this.goodsTypeTime = goodsTypeTime;
		this.goodsTypeUpdateTime = goodsTypeUpdateTime;
		this.goodsHoldOne = goodsHoldOne;
		this.goodsHoldTwo = goodsHoldTwo;
		this.goodsInfos = goodsInfos;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "GOODS_TYPE_ID", unique = true, nullable = false)
	public Integer getGoodsTypeId() {
		return this.goodsTypeId;
	}

	public void setGoodsTypeId(Integer goodsTypeId) {
		this.goodsTypeId = goodsTypeId;
	}

	@Column(name = "GOODS_TYPE_NAME", length = 10)
	public String getGoodsTypeName() {
		return this.goodsTypeName;
	}

	public void setGoodsTypeName(String goodsTypeName) {
		this.goodsTypeName = goodsTypeName;
	}

	@Column(name = "GOODS_TYPE_STATE")
	public Integer getGoodsTypeState() {
		return this.goodsTypeState;
	}

	public void setGoodsTypeState(Integer goodsTypeState) {
		this.goodsTypeState = goodsTypeState;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "GOODS_TYPE_TIME", length = 19)
	public Date getGoodsTypeTime() {
		return this.goodsTypeTime;
	}

	public void setGoodsTypeTime(Date goodsTypeTime) {
		this.goodsTypeTime = goodsTypeTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "GOODS_TYPE_UPDATE_TIME", length = 19)
	public Date getGoodsTypeUpdateTime() {
		return this.goodsTypeUpdateTime;
	}

	public void setGoodsTypeUpdateTime(Date goodsTypeUpdateTime) {
		this.goodsTypeUpdateTime = goodsTypeUpdateTime;
	}

	@Column(name = "GOODS_HOLD_ONE", length = 25)
	public String getGoodsHoldOne() {
		return this.goodsHoldOne;
	}

	public void setGoodsHoldOne(String goodsHoldOne) {
		this.goodsHoldOne = goodsHoldOne;
	}

	@Column(name = "GOODS_HOLD_TWO", length = 25)
	public String getGoodsHoldTwo() {
		return this.goodsHoldTwo;
	}

	public void setGoodsHoldTwo(String goodsHoldTwo) {
		this.goodsHoldTwo = goodsHoldTwo;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "goodsType")
	public Set<GoodsInfo> getGoodsInfos() {
		return this.goodsInfos;
	}

	public void setGoodsInfos(Set<GoodsInfo> goodsInfos) {
		this.goodsInfos = goodsInfos;
	}

}
